/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Rodunu.Movies.Contracts
{
	/// <summary>
	/// Comments object for NHibernate mapped table 'Comments'.
	/// </summary>
	[Serializable]
	public class Comments : IIdentifier
	{
		#region Member Variables
		protected long _id;
		protected long _usermovieid;
		protected long _userid;
		protected string _comment;
		protected DateTime _dateadded;
		protected bool _removed;
		#endregion
		#region Constructors
			
		public Comments() {}
					
		public Comments(long usermovieid, long userid, string comment, DateTime dateadded, bool removed) 
		{
			this._usermovieid= usermovieid;
			this._userid= userid;
			this._comment= comment;
			this._dateadded= dateadded;
			this._removed= removed;
		}

		public Comments(long usermovieid, long userid, string comment, DateTime dateadded)
		{
			this._usermovieid= usermovieid;
			this._userid= userid;
			this._comment= comment;
			this._dateadded= dateadded;
		}
		
		#endregion
		#region Public Properties
		public  virtual long Id
		{
			get { return _id; }
			set {_id= value; }
		}
		public  virtual long UserMovieId
		{
			get { return _usermovieid; }
			set {_usermovieid= value; }
		}
		public  virtual long UserId
		{
			get { return _userid; }
			set {_userid= value; }
		}
		public  virtual string Comment
		{
			get { return _comment; }
			set {_comment= value; }
		}
		public  virtual DateTime DateAdded
		{
			get { return _dateadded; }
			set {_dateadded= value; }
		}
		public  virtual bool Removed
		{
			get { return _removed; }
			set {_removed= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			Comments castObj = (Comments)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
